<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
  // 编写函数rev(char) 实现将字符串char倒置
  function rev(char=''){
    return char.split("").reverse().join("");
  }

  var str = '我是一个测试的字符串';
  console.log("原串："+str)
  console.log("翻转以后：" + rev(str));
</script>
</html>